﻿using System.Collections.Generic;
using Baik.Interface.Execution;
using Baik.Interface.Framework;

namespace Baik.Execution
{
    public class TrueValue : BuiltInObject, ITrue
    {
        public TrueValue(IInjector inject) : base(inject)
        {
            this.Assign("toString", BuiltInFactory.Function(inject, ToIString));
        }

        private IObject ToIString(IEnumerable<IObject> arg)
        {
            var rtn = Inject.Instantiate<IString>();
            rtn.Value = AsString();
            return rtn;
        }
        public override string AsString()
        {
            return "true";
        }
        public bool Value { get; set; }
    }
}